﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="CONSULTAGARANTIA.aspx.vb" Inherits="IMSS.SA.Formulario_web113" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            text-align: center;
        }
        .style4
        {
            width: 569px;
            height: 21px;
        }
        .style5
        {
            height: 21px;
            width: 556px;
        }
        .style6
        {
            text-align: center;
            width: 556px;
        }
        .style7
        {
            width: 569px;
            text-align: center;
        }
        .style8
        {
            width: 569px;
        }
        .style9
        {
            width: 556px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width:100%; color: #FFFFFF; background-color: #006699; background-image: url('../Styles/r3.PNG'); background-repeat: no-repeat;">
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                CONSULTA Y ACTUALIZACION DE GARANTIA</td>
        </tr>
        <tr>
            <td class="style4">
                </td>
            <td class="style5">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                DIGITE EL NUMERO DE GARANTIA QUE DESEA CONSULTAR</td>
            <td class="style6">
                <asp:TextBox ID="TextCONSULTARG" runat="server" MaxLength="15"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style1" colspan="2">
                <asp:Button ID="BotonCONSULTARG" runat="server" Text="CONSULTAR" 
                    Width="120px" />
            </td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style1" colspan="2">
                <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" 
                    DataKeyNames="Id_garantia">
                    <AlternatingItemTemplate>
                        <tr style="background-color: #FFFFFF; color: #284775;">
                            <td>
                                <asp:Label ID="Id_garantiaLabel" runat="server" 
                                    Text='<%# Eval("Id_garantia") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_inicialLabel" runat="server" 
                                    Text='<%# Eval("Fecha_inicial") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_finalLabel" runat="server" 
                                    Text='<%# Eval("Fecha_final") %>' />
                            </td>
                            <td>
                                <asp:Label ID="DescripcionLabel" runat="server" 
                                    Text='<%# Eval("Descripcion") %>' />
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                    <EditItemTemplate>
                        <tr style="background-color: #999999;">
                            <td>
                                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                                    Text="Actualizar" />
                                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                    Text="Cancelar" />
                            </td>
                            <td>
                                <asp:Label ID="Id_garantiaLabel1" runat="server" 
                                    Text='<%# Eval("Id_garantia") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="Fecha_inicialTextBox" runat="server" 
                                    Text='<%# Bind("Fecha_inicial") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="Fecha_finalTextBox" runat="server" 
                                    Text='<%# Bind("Fecha_final") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="DescripcionTextBox" runat="server" 
                                    Text='<%# Bind("Descripcion") %>' />
                            </td>
                        </tr>
                    </EditItemTemplate>
                    <EmptyDataTemplate>
                        <table runat="server" 
                            style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                            <tr>
                                <td>
                                    No se han devuelto datos.</td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <InsertItemTemplate>
                        <tr style="">
                            <td>
                                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                                    Text="Insertar" />
                                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                    Text="Borrar" />
                            </td>
                            <td>
                                <asp:TextBox ID="Id_garantiaTextBox" runat="server" 
                                    Text='<%# Bind("Id_garantia") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="Fecha_inicialTextBox" runat="server" 
                                    Text='<%# Bind("Fecha_inicial") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="Fecha_finalTextBox" runat="server" 
                                    Text='<%# Bind("Fecha_final") %>' />
                            </td>
                            <td>
                                <asp:TextBox ID="DescripcionTextBox" runat="server" 
                                    Text='<%# Bind("Descripcion") %>' />
                            </td>
                        </tr>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <tr style="background-color: #E0FFFF; color: #333333;">
                            <td>
                                <asp:Label ID="Id_garantiaLabel" runat="server" 
                                    Text='<%# Eval("Id_garantia") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_inicialLabel" runat="server" 
                                    Text='<%# Eval("Fecha_inicial") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_finalLabel" runat="server" 
                                    Text='<%# Eval("Fecha_final") %>' />
                            </td>
                            <td>
                                <asp:Label ID="DescripcionLabel" runat="server" 
                                    Text='<%# Eval("Descripcion") %>' />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <LayoutTemplate>
                        <table runat="server">
                            <tr runat="server">
                                <td runat="server">
                                    <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                        style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                        <tr runat="server" style="background-color: #E0FFFF; color: #333333;">
                                            <th runat="server">
                                                Id_garantia</th>
                                            <th runat="server">
                                                Fecha_inicial</th>
                                            <th runat="server">
                                                Fecha_final</th>
                                            <th runat="server">
                                                Descripcion</th>
                                        </tr>
                                        <tr ID="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr runat="server">
                                <td runat="server" 
                                    
                                    style="text-align: center;background-color: #5D7B9D; font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF;">
                                </td>
                            </tr>
                        </table>
                    </LayoutTemplate>
                    <SelectedItemTemplate>
                        <tr style="background-color: #E2DED6; font-weight: bold;color: #333333;">
                            <td>
                                <asp:Label ID="Id_garantiaLabel" runat="server" 
                                    Text='<%# Eval("Id_garantia") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_inicialLabel" runat="server" 
                                    Text='<%# Eval("Fecha_inicial") %>' />
                            </td>
                            <td>
                                <asp:Label ID="Fecha_finalLabel" runat="server" 
                                    Text='<%# Eval("Fecha_final") %>' />
                            </td>
                            <td>
                                <asp:Label ID="DescripcionLabel" runat="server" 
                                    Text='<%# Eval("Descripcion") %>' />
                            </td>
                        </tr>
                    </SelectedItemTemplate>
                </asp:ListView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:IMSS.SAConnectionString20 %>" 
                    OldValuesParameterFormatString="original_{0}" 
                    
                    SelectCommand="SELECT [Id_garantia], [Fecha_inicial], [Fecha_final], [Descripcion] FROM [GARANTIA] WHERE ([Id_garantia] = @Id_garantia)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="TextCONSULTARG" Name="Id_garantia" 
                            PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="style8">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
